package com.yizhang.pattern.decorator;

/**
 * @Author: yi.zhang
 * @CreateTime: 2025-08-29 14:24:37
 * @Description:
 */
public class Test {

    public static void main(String[] args) {
        Coffee coffee = new SimpleCoffee();
        System.out.println("名称：" + coffee.getDescription() + " 价格：" + coffee.getPrice());

        coffee = new MilkDecorator(coffee);
        System.out.println("名称：" + coffee.getDescription() + " 价格：" + coffee.getPrice());

        coffee = new SugarDecorator(coffee);
        System.out.println("名称：" + coffee.getDescription() + " 价格：" + coffee.getPrice());
    }
}
